<!-- src/views/admin/send-notification.vue -->
<template>
  <div>
    <el-form :model="form" label-width="80px">
      <el-form-item label="用户ID">
        <el-input v-model="form.userId"></el-input>
      </el-form-item>
      <el-form-item label="消息内容">
        <el-input v-model="form.content" type="textarea"></el-input>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="sendNotification">发送</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
import request from '@/utils/request'
export default {
  data() {
    return {
      form: {
        userId: '1ssd3',
        content: ''
      }
    };
  },
  methods: {
    sendNotification() {
      request({
    url: '/sendNotification',
    method: 'post',
    data: this.form
  }).then(response => {
        this.$message.success('发送成功'+response);
      });

    }
  }
};
</script>
